--[[/**
-- * 
 * 改变能量，溢出则增加buff
 *
 * @author heyang
-- *
-- */]]

---@class BuffEffect494101 : BaseBuffEffect
BuffEffect494101 = ClientFight.CreateClass("BuffEffect494101", ClientFight.BaseBuffEffect)
local t = BuffEffect494101

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    if (table.getn(parameters)  < 1)then
    return IBuffEffect.FAIL;
    end
    local change = parameters[1];
    local buffEffectValue = buff.buffBean.f_BuffEffectValue;
    local addHp = Utils.calcRatio(change, buffEffectValue[1]);
    DamageManager.setFighterHp(fight, buff.source, buff.source, nil, DamageResultTypeEnum.NORMAL,addHp,buff.source.hp +addHp,true,false,false);
    SkillRoleMgr.savePathFile( "[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff"
    .. buff.modelId .. " 额外回复血量: " .. addHp);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()